package cn.com.recloud.report;

import com.bstek.ureport.console.UReportServlet;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ImportResource;

/**
 *
 * 加载对应的xml配置文件
 */
//@ImportResource("classpath:ureport-console-context.xml")
@ImportResource("classpath:context.xml")
@SpringBootApplication
public class App {
    public static void main( String[] args ){
        SpringApplication.run(App.class, args);
    }

    @Bean
    public ServletRegistrationBean ureportServlet(){
        ServletRegistrationBean bean = new ServletRegistrationBean(new UReportServlet(),"/ureport/*");
        return bean;
    }
}
